package br.com.fiap.entity;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

//@Entity
@Table(name="TAB_CONSULTA")
@SequenceGenerator(name="seqConsulta", sequenceName="SEQ_CONSULTA", allocationSize=1 )
public class Consulta {
	
	@Id
	@Column(name="COD_CONSULTA")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seqConsulta")
	private int id;
	
	@Column(name="NM_PACIENTE")
	private Paciente paciente;
	
	@ManyToOne()
	@Column(name="NM_MEDICO")
	private Medico medico;
	
	@Temporal(TemporalType.DATE)
	@Column(name="DT_ATEND")
	private Calendar dataAtendimento;
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Medico getMedico() {
		return medico;
	}
	public void setMedico(Medico medico) {
		this.medico = medico;
	}
	public Calendar getDataAtendimento() {
		return dataAtendimento;
	}
	public void setDataAtendimento(Calendar dataAtendimento) {
		this.dataAtendimento = dataAtendimento;
	}
	
	
	
	
	

}
